package com.ethink.gateway.constant;

import com.ethink.framework.common.constant.CommonConstant;
import org.springframework.cloud.gateway.filter.NettyWriteResponseFilter;


/**
 * 网关常量
 *
 * @author yunduo
 */
public final class GatewayConstant extends CommonConstant {

    public static final String ATTR_REQUEST_INFO = "ATTR_REQUEST_INFO";

    public static final int FILTER_ORDER_TRACE = 2;
    public static final int FILTER_ORDER_REQUEST_LOG = 3;
    /**
     * 登录认证
     */
    public static final int FILTER_ORDER_AUTHENTICATION = 4;
    /**
     * 鉴权
     */
    public static final int FILTER_ORDER_AUTHORIZATION = 5;

    public static final int FILTER_ORDER_CORS_RESPONSE = NettyWriteResponseFilter.WRITE_RESPONSE_FILTER_ORDER - 1;
    public static final int FILTER_ORDER_RESPONSE_LOG = NettyWriteResponseFilter.WRITE_RESPONSE_FILTER_ORDER - 2;


    public static final String SYSTEM_USER_TOKEN_HEADER = "Authorization";
}